-- @owner: cloudsbreak
-- @date: 2025/06/30
-- @testpoint:使用抽象数据类型--创建行对象表，并插入数据
--setup
@conn  PrimaryDbAmode;

--step1:
create type typa as object(a int,name varchar2(10),
constructor function typa(m_a int) return self as result
);
create or replace type body typa as constructor function typa(m_a int) return self as result is 
begin
a:=m_a;
return ;
end;
end;
/
create table object_table of typa;
insert into object_table values(1,'nanjing');
insert into object_table values(typa(1,'nanjing'));
select * from object_table;
select A from object_table;
select value(c)  from object_table c;

--teardown:环境清理
drop type typa;
drop table object_table;

